package ba01;

/**
 * @author 飞哥
 * @version V1.0
 * @package ba01
 * @date 2021/7/23 10:36
 */
public class Student {
    private String name;
    private Integer age;

    public Student() {
        System.out.println("无参构造方法！");
    }

    public Student(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setEmail(String email) {
        System.out.println("setEmail = " + email);
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
